// _private/cpt/page-pull-down/index.js
const { $wx, $config } = getApp()
Component({
    options: {
        virtualHost: true
    },
    properties: {
        className:String,
        background:{ type: String, value: $config.refresh.bgcolor },
        height: { type: String, value: '100%' },
        style: { type: String, value: $config.refresh.dotColor }
    },
    methods: {
        // 下拉刷新
        async onPullDownRefresh(){
            this.triggerEvent('refresh')
        },
        close(){
            this.setData({ refresh: false })
            $wx.msg.info('刷新成功')
        }
    }
})
